const advertDao = require('../dao/advertDao');
const serviceCommon = require('../util/serviceCommon');

const service = {
    handleAddAdvert: async (data) => {
        let result;
        result = await serviceCommon.addDataMethod(advertDao, 'handleAddAdvert', data);
        return result;
    },
    handleEditAdvert: async (data) => {
        let result;
        result = await serviceCommon.editDataMethod(advertDao, 'handleEditAdvert', data);
        return result;
    },
    handleDeleteAdvert: async (data) => {
        let result;
        result = await serviceCommon.deleteDataMethod(advertDao, 'handleDeleteAdvert', data);
        return result;
    },
    handleGetAdvert: async () => {
        let result;
        result = await serviceCommon.getListMethod(advertDao, 'handleGetAdvert');
        return result;
    },
    handleGetTargetData: async (data) => {
        let result;
        result = await serviceCommon.getListMethod(advertDao, 'handleGetTargetData', data);
        return result;
    }
};
module.exports = service;